Image processing apparatus and method, recording medium, and program

ABSTRACT

An image processing apparatus, for equally dividing an area of an arbitrary figure by pixel units by a number of parallel lines, which includes an input element for inputting a dividing number for a figure obtaining element which obtains a total number of pixels of the figure, a calculating element for calculating an initial ideal value by dividing the total number of pixels by the dividing number, a computing element for computing an ideal value of the number of pixels of a kth divided region in the figure using the initial ideal value and a sum of determined values of the numbers of pixels of a first to a (k−1)th divided region, and a determining element for determining a determined value of the number of pixels of the kth divided region such that an error between the determined value of the number of pixels of the kth divided region and the ideal value of the number of pixels of the kth divided region is minimized.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 10/121,896 filed on Apr. 11, 2002, now U.S. Pat. No. 6,919,922the disclosure of which is herein incorporated by reference.

BACKGROUND OF THE INVENTION

The present invention relates to an apparatus and a method for imageprocessing, a recording medium, and a program, and particularly to anapparatus and a method for image processing, a recording medium, and aprogram suitable for use in a case, for example, where the area of anarbitrary figure is divided by pixel units as equally as possible.

As shown in FIG. 1, for example, there are techniques for obtaining anumber of pieces of two-dimensional image data by photographing athree-dimensional object from a number of positions on a circumferenceformed with the three-dimensional object as a center, and performingpredetermined processing on the number of pieces of two-dimensionalimage data using a computer or the like to thereby generatethree-dimensional image data of a given region including thethree-dimensional object (region represented by a cylinder in FIG. 1 andhereinafter described as a reconstructing region).

The processing for generating the three-dimensional image data using thetwo-dimensional image data requires an enormous amount of storage ofboth space and calculation. Hence, when the processing is performedusing a single calculator (such as a computer workstation), it takes along time to obtain the three-dimensional image data as a result of theprocessing.

Thus, as described in literature such as “Toru Sasaki and YasushiFukuda: Reconstruction of Three-Dimensional X-Ray CT Image UsingDistributed Memory Type Multiprocessor System, Information ProcessingSociety of Japan, pp. 1681, vol. 38, No. 9, September 1997” and“Feldkamp, L. A., Davis, L. C. and Kress, J. W.: Practical Cone-beamAlgorithm, Optical Society of America, Vol. 1, pp. 612–619 (1984),” forexample, a processing time required to obtain the three-dimensionalimage data may be reduced by dividing the reconstructing region in avertical direction by a number of parallel lines, and making a parallelcomputer (or a number of independent computers) capable of performing anumber of different computations simultaneously perform a computationfor each of the divided regions.

When the reconstructing region is divided into a number of regions anddifferent computers of the parallel computer are made to performcomputations for the divided regions simultaneously, a method ofdividing the reconstructing region is an important problem in reducingthe processing time required to obtain the three-dimensional image data.

Suppose that the shape of a figure when the reconstructing region isviewed from a given direction is as shown in FIG. 2, for example. FIG. 3shows an example of division of the reconstructing region. In the caseof FIG. 3, the reconstructing region is divided into a number of regionsequal to each other in width in a direction of the axis of abscissas(divided into six parts). Computations for the six divided regions S₁ toS₆ are performed by six computers P₁ to P₆ that perform paralleloperation. In this case, as is clear from FIG. 3, areas of the regionsS₁ to S₆ differ greatly from each other and, therefore, the computers P₁to P₆ each have a different processing time (computation time), as shownin FIG. 4. Hence, the longest processing time, or the processing time ofthe computer P₆ is a real processing time T₁ of the computers P₁ to P₆as a whole.

Next, FIG. 5 shows another example of division of the reconstructingregion. In the case of FIG. 5, the reconstructing region is divided in adirection of the axis of abscissas (divided into six parts) such thatareas of regions after the division are equal to each other.Computations for the six divided regions S₁ to S₆ are performed by sixcomputers P₁ to P₆ that perform parallel operation. In this case, theareas of the regions S₁ to S₆ are equal to each other and, therefore,the processing times of the computers P₁ to P₆ are also equal to eachother, as shown in FIG. 6. Hence, a real processing time T₂ of thecomputers P₁ to P₆ as a whole is shorter than the real processing timeT₁ of the computers P₁ to P₆ as a whole in the case of FIG. 3.

It is easy to geometrically divide an arbitrary figure in the directionof the axis of abscissas such that areas of regions after the divisionare equal to each other, as shown in FIG. 5. In practice, however, imagedata of the reconstructing region is formed by pixel units. A dividingboundary line is therefore limited to a position between pixels; inother words, the division needs to be made by pixel units. However, itis difficult to divide an arbitrary figure by pixel units in thedirection of the axis of abscissas such that areas after the divisionare equal to each other, and no techniques for this have beenestablished.

SUMMARY OF THE INVENTION

It is an object of the present invention to make it possible to dividean arbitrary figure by pixel units in a given direction such that areasafter the division are as equal to each other as possible.

According to the present invention, there is provided an imageprocessing apparatus which includes: an input element for inputting adividing number for a figure; an obtaining element for obtaining a totalnumber of pixels of the figure; a calculating element for calculating aninitial ideal value by dividing the total number of pixels by thedividing number; a computing element for computing an ideal value of thenumber of pixels of a kth divided region in the figure using the initialideal value and a sum of determined values of the numbers of pixels of afirst to a (k−1)th divided region; and a determining element fordetermining a determined value of the number of pixels of the kthdivided region such that an error between the determined value of thenumber of pixels of the kth divided region and the ideal value of thenumber of pixels of the kth divided region is minimized.

The determining element can determine the determined value of the numberof pixels of the kth divided region by adding and subtracting pixels ofthe figure by a column unit such that the error between the determinedvalue of the number of pixels of the kth divided region and the idealvalue of the number of pixels of the kth divided region is minimized.

According to the present invention, there also is provides an imageprocessing method which includes: an input step for inputting a dividingnumber for a figure; an obtaining step for obtaining a total number ofpixels of the figure; a calculating step for calculating an initialideal value by dividing the total number of pixels by the dividingnumber; a computing step for computing an ideal value of the number ofpixels of a kth divided region in the figure using the initial idealvalue and a sum of determined values of the numbers of pixels of a firstto a (k−1)th divided region; and a determining step for determining adetermined value of the number of pixels of the kth divided region suchthat an error between the determined value of the number of pixels ofthe kth divided region and the ideal value of the number of pixels ofthe kth divided region is minimized.

The present invention also provides a program on a recording mediumwhich includes: an input step for inputting a dividing number for afigure; an obtaining step for obtaining a total number of pixels of thefigure; a calculating step for calculating an initial ideal value bydividing the total number of pixels by the dividing number; a computingstep for computing an ideal value of the number of pixels of a kthdivided region in the figure using the initial ideal value and a sum ofdetermined values of the numbers of pixels of a first to a (k−1)thdivided region; and a determining step for determining a determinedvalue of the number of pixels of the kth divided region such that anerror between the determined value of the number of pixels of the kthdivided region and the ideal value of the number of pixels of the kthdivided region is minimized.

Moreover, the present invention provides a program executed by acomputer which includes: an input step for inputting a dividing numberfor a figure; an obtaining step for obtaining a total number of pixelsof the figure; a calculating step for calculating an initial ideal valueby dividing the total number of pixels by the dividing number; acomputing step for computing an ideal value of the number of pixels of akth divided region in the figure using the initial ideal value and a sumof determined values of the numbers of pixels of a first to a (k−1)thdivided region; and a determining step for determining a determinedvalue of the number of pixels of the kth divided region such that anerror between the determined value of the number of pixels of the kthdivided region and the ideal value of the number of pixels of the kthdivided region is minimized.

The image processing apparatus and method and the program according tothe present invention input a dividing number for a figure, obtain atotal number of pixels of the figure, and calculate an initial idealvalue by dividing the total number of pixels by the dividing number.Further, the image processing apparatus and method and the programaccording to the present invention compute an ideal value of the numberof pixels of a kth divided region in the figure using the initial idealvalue and a sum of determined values of the numbers of pixels of a firstto a (k−1)th divided region, and determine a determined value of thenumber of pixels of the kth divided region such that an error betweenthe determined value of the number of pixels of the kth divided regionand the ideal value of the number of pixels of the kth divided region isminimized.

Additional features and advantages of the present invention aredescribed in, and will be apparent from, the following DetailedDescription of the Invention and the Figures.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 is a diagram to assist in explaining a conventional technique forgenerating three-dimensional image data of a reconstructing region usingtwo-dimensional image data.

FIG. 2 is a diagram showing an example of the shape of a target region.

FIG. 3 is a diagram showing an example of dividing the target regioninto parts equal to each other in width.

FIG. 4 is a diagram to assist in explaining processing time when thetarget region is divided into parts equal to each other in width.

FIG. 5 is a diagram showing an example of dividing the target regioninto parts equal to each other in area.

FIG. 6 is a diagram to assist in explaining processing time when thetarget region is divided into parts equal to each other in area.

FIG. 7 is a block diagram showing an example of a configuration of athree-dimensional image data generating system.

FIG. 8 is a block diagram showing an example of a configuration of aninformation processing apparatus as a control unit.

FIG. 9 is a flowchart to assist in explaining three-dimensional imagedata generating processing of the three-dimensional image datagenerating system.

FIG. 10 is a flowchart to assist in explaining equal division processingof the control unit at a step S2.

FIG. 11 is a diagram to assist in explaining a method of specifying atarget region.

FIG. 12 is a diagram to assist in explaining a method of determiningwhether or not a pixel is included in the target region.

FIG. 13 is a diagram to assist in explaining a result of the equaldivision processing.

DETAILED DESCRIPTION OF THE INVENTION

An example of a configuration of a three-dimensional image datagenerating system to which the present invention is applied will bedescribed with reference to FIG. 7.

An image pickup unit 1 obtains a number of pieces of two-dimensionalimage data by photographing a three-dimensional object from a number ofpositions on a circumference formed with the three-dimensional object asa center. The image pickup unit 1 then outputs the pieces oftwo-dimensional image data to a control unit 2. The control unit 2supplies the number of pieces of two-dimensional image data inputtedfrom the image pickup unit 1 to arithmetic units 3-1 to 3-N. Also, thecontrol unit 2 divides a shape when a reconstructing region is viewedfrom a given direction by pixel units as equally as possible by a numberof straight lines parallel to each other, and assigns arithmeticprocessing on divided regions to the arithmetic units 3-1 to 3-N. Inaddition, the control unit 2 integrates arithmetic results supplied fromthe arithmetic units 3-1 to 3-N (hereinafter described simply as thearithmetic unit 3 when the arithmetic units 3-1 to 3-N do not need to bedistinguished individually) to thereby generate three-dimensional imagedata of the reconstructing region. The arithmetic unit 3 performs thearithmetic processing assigned by the control unit 2, and then outputsthe result to the control unit 2.

FIG. 8 shows an example of configuration of an information processingapparatus such as a workstation that functions as the control unit 2 byexecuting a predetermined program.

The information processing apparatus includes a CPU (Central ProcessingUnit) 21. The CPU 21 is connected with an input/output interface 25 viaa bus 24. The input/output interface 25 is connected with: a controlinput unit 26 formed by input devices such as a keyboard and a mouse forthe user to input a control command; a display unit 27 formed by a CRT(Cathode Ray Tube), an LCD (Liquid Crystal Display) or the like fordisplaying a result of processing, etc.; a storage unit 28 formed by ahard disk drive or the like for storing programs and various data; acommunication unit 29 for communicating data via a network such as theInternet; and a drive 30 for reading and writing data from and to arecording medium such as a magnetic disk 31 to a semiconductor memory34. The bus 24 is connected with a ROM (Read Only Memory) 22 and a RAM(Random Access Memory) 23.

The program that allows the information processing apparatus to performoperation as the control unit 2 is supplied to the informationprocessing apparatus in a state of being stored on the magnetic disk 31(including a floppy disk), the optical disk 32 (including CD-ROM(Compact Disc-Read Only Memory) and DVD (Digital Versatile Disc)), themagneto-optical disk 33 (including MD (Mini Disc)), or the semiconductormemory 34, is read by the drive 30, and is installed on the hard diskdrive included in the storage unit 28. The program installed in thestorage unit 28 is loaded from the storage unit 28 into the RAM 23 andthen executed by a command of the CPU 21 corresponding to an operationby the user inputted to the control input unit 26.

The arithmetic unit 3 also can take the form of an informationprocessing apparatus having, for example, a configuration as shown inFIG. 8 which executes a predetermined program. The arithmetic unit 3, orinformation processing apparatus, also might have a number of CPUs tofurther divide the arithmetic processing assigned by the control unit 2and then simultaneously perform the divided arithmetic processing.

Operation of the three-dimensional image data generating system willnext be described with reference to a flowchart of FIG. 9.

At a step S1, the image pickup unit 1 photographs a three-dimensionalobject from a number of positions on a circumference formed with thethree-dimensional object as a center. The image pickup unit 1 thenoutputs a number of pieces of two-dimensional image data obtained to thecontrol unit 2.

At a step S2, the control unit 2 supplies the number of pieces oftwo-dimensional image data inputted from the image pickup unit 1 to thearithmetic units 3-1 to 3-N, and the control unit 2 divides a shape whena reconstructing region is viewed from a given direction (hereinafterdescribed as a target region) by pixel units as equally as possible by anumber of straight lines parallel to each other, and assigns arithmeticprocessing on divided regions to the arithmetic units 3-1 to 3-N.Incidentally, the processing of dividing the target region by pixelunits as equally as possible by a number of straight lines parallel toeach other (hereinafter described as equal division processing) will bedescribed later with reference to FIG. 10.

At a step S3, the arithmetic unit 3 performs the arithmetic processingassigned by the control unit 2, and then outputs the result to thecontrol unit 2. At a step S4, the control unit 2 integrates arithmeticresults supplied from the arithmetic units 3-1 to 3-N to therebygenerate three-dimensional image data of the reconstructing region.

The division processing by the control unit 2 at the step S2 next willbe described with reference to a flowchart of FIG. 10. In the following,a case in which the reconstructing region is of a cylindrical shape asshown in FIG. 1 and the target region to be divided is of a circularshape will be described as an example.

At a step S11, the control unit 2 receives an operation from the userspecifying the target region to be divided and the dividing number N. Inthe method of specifying the target region, when the target region is ofa circular shape as in the present case, coordinates (xc, yc) of acenter C and a radius r of the target region are specified, as shown inFIG. 11. Depending on the shape of the target region, a vertical width hand a horizontal width w may be specified.

At a step S12, the control unit 2 obtains a total number Total of pixelsconstituting the target region by determining whether or not each of allpixels of an area containing the target region is situated in the targetregion. When the target region is of a circular shape as in the presentcase, the following equation (1) is applied to each of all the pixels ofthe area containing the target region to calculate a distance CP betweenthe center C (xc, yc) of the circle forming the target region andcoordinates P (i, j) of a center of the pixel. It is determined that apixel having a distance CP equal to or less than the radius r of thetarget region (pixel P2 in FIG. 13) is a pixel forming the targetregion, as shown in FIG. 12. It is determined that a pixel having adistance CP more than the radius r of the target region (pixel P1 inFIG. 13) is a pixel not forming the target region.CP=((xc−i)²+(yc−j)²)r  (1)

Incidentally, the processing for obtaining the total number Total ofpixels is speeded up by applying the equation (1) to each pixel columnin a vertical direction rather than applying the equation (1) randomlytracing all the pixels of the area containing the target region.

In addition, when the target region is of a shape symmetrical withrespect to a point or symmetrical with respect to a line, such as acircular shape, a time required for the processing for obtaining thetotal number Total of pixels is reduced by obtaining the number ofpixels constituting a sector that is 1/n of the circle and multiplyingthe value by n, rather than obtaining the number of pixels constitutingthe whole of the target region, or the circle.

Then, the control unit 2 divides the total number Total of pixels by thedividing number N to determine an ideal initial value St[0].St[0]=Total/N  (2)

At a step S13, the control unit 2 initializes a parameter k to 1.

At a step S14, as expressed by the following equation (3), the controlunit 2 calculates an ideal value St[k] of the number of pixels of a kthdivided region Sk (hereinafter described as a section) in the targetregion divided by N by adding to the ideal initial value St[0] an errorbetween an ideal value (k−1) Total/N up to a (k−1)th section and a sumΣSd of a determined value Sd[1] of the number of pixels of a firstsection S₁ to a determined value Sd[k−1] of the number of pixels of the(k−1)th section S_(k−1). The determined value Sd[ ] is determined at astep S15. $\begin{matrix}\begin{matrix}{{{St}\lbrack k\rbrack} = {{{St}\lbrack 0\rbrack} + \left\lbrack {{\left( {k - 1} \right)\mspace{14mu}{{Total}/N}} - {\Sigma\;{Sd}}} \right\rbrack}} \\{= {{{St}\lbrack 0\rbrack} + \left\lbrack {{\left( {k - 1} \right)\mspace{14mu}{{Total}/N}} - \left( {{{Sd}\lbrack 1\rbrack} + \ldots + {{Sd}\left\lbrack {k - 1} \right\rbrack}} \right)} \right\rbrack}}\end{matrix} & (3)\end{matrix}$

It is to be noted that an ideal value St[1] of the first divided sectionS₁ is the initial ideal value St[0].St[1]=St[0]

According to the equation (3), an ideal value St[2] of a second dividedsection S₂, for example, is:St[2]=St[0]+[Total/N−Sd[1]]

According to the equation (3), an ideal value St[3] of a third dividedsection S₃, for example, is:St[3]=St[0]+[2 Total/N−(Sd[1]+Sd[2])]

At the step S15, the control unit 2 determines the determined valueSd[k] of the number of pixels of the kth section S_(k) on the basis ofthe ideal value St[k] of the number of pixels of the kth section S_(k).

This will be described more specifically. In the following, a totalnumber of pixels of a first column from the left to an ith column in thekth section S_(k) will be described as S[k][i], wherein the parameter idenotes a column number in the section S_(k). The control unit 2determines the value of the parameter i that satisfies the followingequation (4).

Specifically, the control unit 2 determines the value of the parameter iwhile incrementing the parameter i by one so that the total numberS[k][i−1] of pixels of the first column to the (i−1)th column in the kthsection S_(k) is smaller than the ideal value St[k] of the number ofpixels of the kth section S_(k), and the total number S[k][i] of pixelsof the first column to the ith column in the kth section S_(k) is equalto or larger than the ideal value St[k] of the number of pixels of thekth section S_(k). The value of the parameter i that satisfies theequation (4) is assumed to be i′.S[k][i−1]<St[k] S[k][i]  (4)

Next, the control unit 2 compares an error |S[k][i′]−St[k]|=Δi′ betweenthe total number S[k][i′] of pixels of the first column to the i′thcolumn in the kth section S_(k) and the ideal value St[k] of the numberof pixels of the kth section S_(k) with an error|S[k][i′−1]−St[k]|=Δ(i′−1) between the total number S[k][i′−1] of pixelsof the first column to the (i′−1)th column in the kth section S_(k) andthe ideal value St[k] of the number of pixels of the kth section S_(k).

When Δi′ is equal to or more than Δ(i′−1), the control unit 2 determinesthe total number S[k][i′] of pixels of the first column to the i′thcolumn in the kth section S_(k) as the determined value Sd[k] of thenumber of pixels of the kth section S_(k). When Δi′ is less thanΔ(i′−1), the control unit 2 determines the total number S[k][i′−1] ofpixels of the first column to the (i′−1)th column in the kth sectionS_(k) as the determined value Sd[k] of the number of pixels of the kthsection S_(k).

When k=N, however, the determined value Sd[N] of the number of pixels ofthe last section S_(N) is a value obtained by subtracting a sumΣSd=(Sd[1]+ . . . +Sd[N−1]) of determined values of the numbers ofpixels of the first to (N−1)th sections from the total number Total ofpixels, as expressed by the following equation (5).Sd[N]=Total−ΣSd  (5)

At a step S16, the control unit 2 determines whether the parameter k isthe dividing number N. When the control unit 2 determines that theparameter k is not the dividing number N, the processing proceeds to astep S17. At the step S17, the control unit 2 increments the parameter kby one. The processing then returns to the step S14 to repeat theprocessing steps from the step S14 on down. When the control unit 2thereafter determines at the step S16 that the parameter k is thedividing number N, the processing returns to the step S3 in FIG. 9.

As described above, according to the equal division processing, asituation in which only the determined value Sd[N] of the number ofpixels of the last section SN differs greatly from the ideal initialvalue St[0] will not arise, for example, and as shown in FIG. 13, thedetermined values Sd[1] to Sd[N] (N=4 in the present case) of thenumbers of pixels of the first section S₁ to the Nth section S_(N) aresubstantially equal to each other. Therefore, computing loads on thearithmetic units 3-1 to 3-N can be made substantially equal to eachother. It is, accordingly, possible to reduce computing time of thesystem as a whole.

It is to be noted that while the equal division processing that makesthe division in only a direction of the axis of ordinates has beendescribed above, an arbitrary target region can be divided equally indirections of multiple axes when the target region is divided in adirection of the axis of ordinates and then divided in a direction ofthe axis of abscissas, for example.

In addition, the present invention is applicable not only to a case inwhich a two-dimensional target region is divided but also to a case inwhich a three- or more-dimensional target region is divided.

It is to be noted that in the present specification, the stepsdescribing the program recorded on a recording medium include not onlyprocessing steps carried out in time series in the described order, butalso processing steps carried out in parallel or individually and notnecessarily in time series.

Furthermore, in the present specification, the system represents theentire apparatus formed by a number of units.

As described above, the image processing apparatus and method and theprogram according to the present invention calculate an ideal value ofthe number of pixels of a kth divided region in a figure using aninitial ideal value and a sum of determined values of the numbers ofpixels of a first to a (k−1)th divided region, and determine adetermined value of the number of pixels of the kth divided region suchthat an error between the determined value of the number of pixels ofthe kth divided region and the ideal value of the number of pixels ofthe kth divided region is minimized. It is therefore possible to dividean arbitrary figure by pixel units in a certain direction such thatareas after the division are as equal to each other as possible.

Although the present invention has been described with reference tospecific embodiments, those of skill in the art will recognize thatchanges may be made thereto without departing from the spirit and scopeof the present invention without departing from the hereafter appendedclaims.

1. A recording medium on which a computer readable program for imageprocessing for equally dividing an area of an arbitrary figure by pixelunits by a plurality of parallel lines is recorded, comprising: an inputstep for inputting a dividing number for the figure; an obtaining stepfor obtaining a total number of pixels of the figure; a calculating stepfor calculating an initial ideal value by dividing the total number ofpixels by the dividing number; a computing step for computing an idealvalue of the number of pixels of a kth divided region in the figureusing the initial ideal value and a sum of determined values of thenumbers of pixels of a first to a (k−1)th divided region; a determiningstep for determining a determined value of the number of pixels of thekth divided region such that an error between the determined value ofthe number of pixels of the kth divided region and an ideal value of thenumber of pixels of the kth divided region is minimized; and a parallelcomputing step for computing an arithmetic result by an arithmetic unitwherein the arithmetic result is integrated to generatethree-dimensional image data.
 2. A recording medium as claimed in claim1, wherein the determining step determines the determined value of thenumber of pixels of the kth divided region by adding and subtractingpixels of the figure by a column unit such that an error between thedetermined value of the number of pixels of the kth divided region andthe ideal value of the number of pixels of the kth divided region isminimized.
 3. A recording medium as claimed in claim 1, wherein thearbitrary figure is a two-dimensional figure.